﻿@using VirtualPress.Infrastructure.Entities.Entity
@using VirtualPress.Infrastructure.HitMonitor
@using VirtualPress.Tool.Framework
@{
    Layout = "/Views/Shared/_Main.cshtml";
    Periodical journal = ViewBag.Journal;
    ViewBag.Title = journal.Name;
    ItemListBox<MagazineItem> data = ViewBag.MagazineItem;
    JournalHitPack journalHit = ViewBag.Hit;
}
@section head{
    <link href="/content/css/magazine.css" rel="stylesheet" />
}
<div class="container">
    <div class="row">
        <div class="span9">
            <!-- navagation -->
            <ul class="breadcrumb">
                <li><a href="/Home">首页</a> <span class="divider">/</span></li>
                <li><a>期刊</a> <span class="divider">/</span></li>
                <li><a href="/Magazine/Home/">行业杂志</a> <span class="divider">/</span></li>
                <li class="active">@journal.Name</li>
            </ul>
            <div class="mini-layout">
                <!-- journal img -->
                <div class="span2">
                    <img style="width: 170px; height: 257px;" alt="@journal.Name" src="@journal.CoverImg" /></div>
                <!-- journal description -->
                <div class="span6">
                    <h4>
                        @journal.Name</h4>
                    <hr class="grayline01" />
                    <p>
                        @journal.Introduction
                    </p>
                    <p>
                    @if (!String.IsNullOrEmpty(journal.ISSN_Print))
                    {
                        @:ISSN：@journal.ISSN_Print<br />
                    }
                    @if (!String.IsNullOrEmpty(journal.ISSN_Online))
                    {
                        @:eISSN:@journal.ISSN_Online<br />
                    }
                    </p>
                </div>
            </div>
            <div class="tabbable">
                <!-- Only required for left/right tabs -->
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#tab1" data-toggle="tab">主办方介绍</a></li>
                    <li><a href="#tab2" data-toggle="tab">关于杂志</a></li>
                    <li><a href="#tab3" data-toggle="tab">发行期</a></li>
                    <li><a href="#tab4" data-toggle="tab">编委会</a></li>
                </ul>
                <div class="tab-content">
                    <div class="tab-pane active" id="tab1">
                        @Html.Raw(journal.CallForPaper)
                    </div>
                    <div class="tab-pane" id="tab2">
                        @Html.Raw(journal.Detail)
                    </div>
                    <div class="tab-pane" id="tab3">
                        <div class="row" id="magazine">
                            @{
                                if (data != null && data.Data != null && data.Data.Any())
                                {
                                    foreach (var item in data.Data)
                                    {
                                <div class="span3">
                                    <div class="book">
                                        <a class="journalitem" href="javascript:;"data-trigger="hover" data-original-title="@(journal.Name + " 第 " + item.Manuscriptcode + " 期")"
                                data-html="true" data-content="@item.Information">
                                            <img src="@journal.CoverImg" alt="@journal.Name" />
                                        </a>
                                        <div class="book-text">
                                            第 <b>@item.Manuscriptcode</b> 期
                                        <div style="float:right;">
                                        <a href="/download?token=@VirtualPress.Tool.Framework.EncodeByBase64.Encode(new { id = @item.Id, journal = @item.PeriodicalId, type = 100 }.ToJson())" title="下载" target="_blank">
                                    <i class="icon-download-alt"></i></a></div>
                                        </div>
                                    </div>
                                </div>
                                    }
                                }
                            }
                        </div>
                        @Html.Raw(data.PageItemSegment)
                    </div>
                    <div class="tab-pane" id="tab4">
                        @Html.Raw(journal.Attention)
                    </div>
                </div>
            </div>
        </div>
        <div class="span3">
            <div class="mini-layout">
                <div class="hspace15">
                </div>
                <div class="well" style="width: 73%; margin: auto">
                    <code>本刊下载量：<a>@journalHit.DownloadNumber</a></code>
                    <div class="hspace10">
                    </div>
                    <code>本刊访问量：<a>@journalHit.VisitNumber</a></code>
                </div>
                <div class="hspace15">
                </div>
                <div class="hspace15">
                </div>
                @RenderPage("~/Views/Shared/Partial/_JournalFriendLinks.cshtml")
                <div class="hspace15">
                </div>
                <div class="hspace15">
                </div>
                @RenderPage("~/Views/Shared/Partial/_Consult.cshtml")
            </div>
        </div>
    </div>
</div>
@section tail
{
    <script type="text/javascript">
        $(function () {
            $('#lijournal').addClass('active');
            $('a.journalitem').popover();
        });
    </script>
}
